package com.dh.blog.task.timer;

import javax.annotation.Resource;

import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

import com.dh.blog.service.FileService;

/**
 * 文件检查后台定时任务
 * 直接用spring的quartz
 * (其实博主也记不住表达式)
 * @author David
 *
 */
@Component
public class CheckFilesTimer{
	@Resource(name="fileService")
	private FileService fileService;
	/**
	 * 每天隔两小时触发(根据实际情况定值)
	 */
	@Scheduled(cron="0 0 0/2 * * ?")
	public void exec(){
		fileService.doCheck();
	}
}
